/*

Author   : chaos

FileName : over_write.cpp

Date     : 14/08/17 09:49:10

*/
#include <iostream>
#include <cstring>
using namespace std;

class library_object
{
    protected:
        char name[30];
        long index;
    public:
        void set_data(const char * i_name)
        {
            strcpy(name,i_name);
            index = 1;
        }
};

class Reader:public library_object
{
    private:
        char name[10];
    public:
        void show_data()
        {
            cout << "Reader's name : " << name;

            cout << "library_object's name: " << library_object::name << endl;

        }
};


int main(int argc ,char *argv[])
{
    Reader A_Reader;

    A_Reader.set_data("John");

    A_Reader.show_data();
    return 0;
}
